A document is a file that stores the data that you’ve created. The most common
document types contain text for word processing (WP) or data in the form of a
spreadsheet (SS) or database (DB).
These three document types are unique, even if created by the same multipurpose application. For example if you use ClarisWorks in its word-processing mode it only creates a WP document — it can’t be used to create a SS document in this environment, but it could introduce a spreadsheet within the word-processing document!
Word Processing
qqqqqqqqqqqq
Inside a Word Processing Application
wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww
Unlike SimpleText, a full-blown word processing application isn’t limited to a 32 K maximum text length and can deal with complex formatting, including outlines and style sheets. It usually features a ruler at the top of each window.
 
This ruler carries attributes such as tab marks, paragraph indents, margins, line spacing, and justification. In ClarisWorks the ruler in one portion of a document can be copied and then pasted into another area — this applies the ruler’s attributes to the selected text.
Justification boxes (under the 5 in the picture above) let you to align the text on a vertical axis positioned on the centre, left-hand margin or right-hand margin. Text that’s justified to both left and right looks smart but is often difficult to read compared to text aligned only to the left — so for best intelligibility keep the right side ragged!
Various editing shortcuts are often available — for example, double-clicking on a word select the word whilst clicking three or four times often selects the line or paragraph. If you double-click on a word and then drag (whilst holding down the mouse) you can select portions of text in word increments.
Some applications, such as ClarisWorks, let you include graphics, either pasted in-line with the text or inserted as a fixed object around which the text is wrapped.
In some instances you can create a mail merge in conjunction with a database file. To do this you create a WP document that calls up fields from the DB file. When the document is printed it automatically creates a version for each entry in the database — a quick way to send out customised letters! Microsoft’s Word goes one step further — you can include IF<>THEN<>ELSE<> statements in the document whose results are dependent on the field contents of the database!
Generic WP Documents
wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww
Text often appears in generic documents that can be opened from inside a suitable application. You can’t open such a file in the Finder unless the application that created it is on your machine or Macintosh Easy Open is installed. A file will only open if it’s recognised by a suitable application or a translator!
You can force a generic file to open in the Finder by changing its Creator code to match an application — a utility such as FileTyper or Snitch can do this.
The following list includes most common document types, with the actual Type code in brackets. Unfortunately not all file types convey formatting, such as font, style, tabs and page layout information. Only the styled text variety of file contains a resource fork.
Plain Text (TEXT/ttro)
 A text file contains standard codes for each character, carriage return and tab.
It doesn’t contain any formatting information that could upset data transmission
via a modem, but may include non-ASCII values that could upset an e-mail system.
  A file of Type ttro can be opened by SimpleText, but can’t be edited. If you want to
modify it you’ll have to change its Type to TEXT by means of a suitable utility.
È Any TEXT file can be opened using SimpleText even if created by another application
— but only if the file’s text content is less than 32 K.
Àù PCs use a filename extension of .TXT.
Styled Text (TEXT/ttro)
  Similar to the above with pure text in the data fork but with an additional styl
resource, containing style information, in the resource fork. This type of file can
be created using SimpleText but can’t be edited if its Type is ttro.
È If a SimpleText styled text file is opened by another application, such as a
communications program, it only extracts the text from the data fork — the styl
resource is ignored. This avoids formatting data that could upset the operation.
È Other applications can use styl resources for styled text without using the data fork.
If styled text appears in the Clipboard it must have come from a styl resource — either
on its own or in conjunction with the data fork.
È PCs can’t directly recognise styl resources in these files — but you should be able to
convert the text into suitable form by using a file translator.
Àù PCs machines use a filename extension of .TXT.
Rich Text Format (TEXT)
  An RTF file is a special Microsoft format that stores text and style in the data fork
— making it equally acceptable to PCs and Macs. RTFs are supported by Microsoft’s
Word and Works, and also by MacWrite II, ClarisWorks, WriteNow and others.
Since it only contains standard characters it can be used for direct transfer as an ASCII file.
Àù Different file translators may produce RTFs belonging to Word or MacWrite II.
Àù When using an XTND translator in a pure text application the resultant RTF is a
standard TEXT file — it’s of no use to an application that needs a real RTF file!
Àù PCs use a filename extension of .TXT.
Document Content Architecture - Revisable Form Text (TEXT)
DCA-RFT is a common PC format, originating from IBM’s Distributed Office Support System (DIOSS) and System Network Architecture (SNA), as used for creating text documents. An RFT contains limited formatting information, including details of margins and page width, but doesn’t accommodate different fonts, font sizes or graphic elements. Text or data fields from other documents may be incorporated into a file
Àù PCs use a filename extension of .RFT.
Document Content Architecture - Final Form Text (TEXT)
DCA-FFT is a less common form of DCA (see above) for storing a completed document. An FFT contains limited formatting information, including details of margins, line spacing, font and justification, together with indicators for text that needs underscore or overstrike.
Àù PCs use a filename extension of .FFT.
HyperText Markup Language (TEXT)
  An HTML file is used to send a page over the World Wide Web on the Internet.
It’s a special form of text file, containing tokens in the data fork to show the
position and nature of formatting.
These documents invariably use Uniform Resource Locators (URLs) to find other documents and links to associated graphics. The latter are usually in GIFf or JPEG format.
UniQorn is a page layout application that works with QuickDraw GX. It can create HTML, GIFf and JPEG files for use with any Java-based Web browser on any kind of computer.
Spreadsheets & Databases
qqqqqqqqqqqqqqqqqqq
Inside a Spreadsheet Application
wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww
A spreadsheet document stores data in cells contained within a grid. For example:-
 
Each cell can contain formatted text or numbers, or the result of a calculation that uses a formula to create text or numbers from other cells. In some applications †-B removes the contents but leaves the formatting untouched.
Cell borders can be customised or made invisible and document headings can be hidden. In most applications you can also add graphics to the document.
Calculations refer to other cells using a cell reference consisting of the column heading (a letter) followed by the row heading (a number). In the above example the cell B7 contains the text TOTAL whilst C7 contains the formula =SUM(C2…C5).
Most references are relative, so if you insert or remove a row or column they continue to work with the same data. However, if you want the formula to always use an exact reference (as opposed to the contents) you can use an absolute reference in either or both parts of the reference. This is shown by a dollar prefix — for example, $B$7, C$8 or $D5.
If a the formula within cell refers to itself, either directly via a formula in another cell, the calculation can’t work — it’s a circular reference.
Inside a Database Application
wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww
A database contains any number of records, each with a common number of fields containing useful information. In this example there two records, each containing six fields with their field names displayed.
 
Each field can contain formatted text (as shown) or numbers — or the result of a calculation that uses a formula to create text or numbers from other fields.
In the above example, the records are in a list, but most applications can show each record in a separate page. You can also select records that meet specific criteria, usually based on the contents of a field. A summary calculation produces a value calculated from specific fields within these selected records — a grand summary uses fields from all of the records.
The appearance of file names and fields in the display are defined within a layout — you can usually have any number of these, each showing the fields that you want to see. You can often add graphics as well.
Most database applications work as a so-called flat database in which all records use common fields. A relational database is much more advanced — it’s effectively a number of databases that can be cross-referred.
Moving Data between Spreadsheets and Databases
wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww
  The information in a spreadsheet or database is very similar. A database has a
number of records, each with a set of fields whilst a spreadsheet contains a
number of rows, each with columns.
If you use a generic document to transfer data between a spreadsheet and a database it’s usually related as follows:-
Database Spreadsheet
Record Row
Field Column
In some cases the first record or row contains field names or column headers. The sending or receiving of these prior to the actual data is often optional. If not, you can delete the unwanted first record or re-enter the names by hand in the destination document.
Transferring Data using a Text File
wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww
  Most database, spreadsheet or Personal Information Manager (PIM) applications
can import or export data as a plain text file (see above).
Each field (DB) or column (SS) entry in the text file is usually separated by a tab or comma — in other words it’s comma-delimited or tab-delimited. A carriage return (CR) usually marks the end of a record (DB) or row (SS).
Here’s an example of a text file containing data:-
where ◊ is a space, ∆ represents a tab and ¬ is a CR.
There shouldn’t be any spaces between entries and tabs or CRs. In this example the first line contains titles that can be used as field names (DB) or column headings (SS).
â Tab-delimited text is preferred — it lets you put commas in your data!
√¢ Comma separated values (CSV) means the same as comma-delimited.
MS-DOS machines use a filename extension of .CSV on these files.
√¢ Before exporting any spreadsheet data make sure that each column contains the
same type of information throughout its length!
The following examples demonstrate the sort of problems you could encounter when exporting from different applications.
~ Spreadsheets
To export from Excel, first highlight the cells to be exported and choose Set
Database. All blank cells will then contain a Tab place holder. If Tabs in the
last column give you problems just add a column filled with random letters!
~ Word Processors
Address lists created in a word processor can easily be exported for use in a
database, spreadsheet or PIM. As with spreadsheets, each ‘column’ should
be filled with the same type of information throughout. Each field should
be separated by a tab character.
~ Free-form Address Books
Applications such as InTouch, SuperQuickDex or FastLabel don’t store contact
information in separate fields. So every bit of data, such as First Name, Last
Name, Company and Address, has to be exported individually and separated
by tab characters. You’ll need a spreadsheet application or word processor to
help you do it!
~ Personal Information Managers
As with other applications you should rarely have any problem exporting a
text file. Certain PIM applications, such as In Control, Acta, or Dyno Notepad
may use an option-space delimiter in place of tab in their text files.
Common PIMs include:-
TouchBase PRO
By default this PIM exports data as tab-delimited text. You can select Include
Merge Header in the Export Data... dialog to help you identify fields. The
export order, from left to right, top to bottom, is:-
This is similar to TouchBase. The export order is:-
Prefix First Name Last Name Suffix
Title
Company Dept Address City
State Zip Country Remarks
Phone1 Code WorkPhone Phone2 Code Home Phone
Phone3 Code Fax Phone4 Code Car Phone
Custom Custom Custom Category
List By* Revised Entry ID
* Name = 0 Business = 1
Dynodex 3.0
For this you should use the Export dialog defaults. Choose Select All on the
left of the box and click Add >> to proceed. By including field names you’ll
be able to identify the fields. Dynodex exports in the following order:-
Business First Name Last Name Title
Address City State Zip
Country
Office Phone Phone Label Home Phone Phone Label
Fax Phone Label Auto Phone Label
Notes Department Key2• Birthday
Email Modify First Line*
• keyword
* Name = N Business = B
~ Calendars
The data used in calendar applications can be exported as easily as any
other information. Here are some example of the order in which data may
be exported:-
Alarming
Date Time Subject Notes
Type Duration Advance Warning
Recurrence Recurrence Recurrence
DateBook
Date Start End Summary
Description Category Type Priority
Completed
DayMaker
Text Start Date Start Time Finish Date
Finish Time To Do Item Done-Undone
Easy Alarms
Date Start Message Advance Notice
Recur Interval
First Things First
Text Priority Done Category
Date Start Time Recurrence Reminder
Advance Warning Type
LapTrack or Timeslips
Date Start Time End Time Title
Description Type Done Category
Other Generic Data Documents
wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww
  The documents below work with most database and spreadsheet applications.
If you can’t use them you’ll have to resort to a text file!
They can often be opened from inside a suitable application. You can’t open a generic document in the Finder unless the application that created it is on your machine or Macintosh Easy Open is installed — you can then open any file recognised by an application or suitable translator.
You can force a generic file to open in the Finder by changing its Creator code to match an application — a utility such as FileTyper or Snitch can do this. All of the files described below only contain a data fork and have Type codes as shown in brackets.
dBase File (F+DB)
A DBF file, created by dBase II or dBase III, is easily converted into a CSV for use with a spreadsheet application such as FileMaker Pro or Excel.
The dBase field types are as follows:-
C Character (text field)
N Numeric (decimals & integers)
D Date (in the form:YYYY/MM/DD)
L Logic (? = undefined, Y/N, T/F )
M Memo
Àù PCs use a filename extension of .DBF.
Document Interchange File (TEXT)
DIF is a common PC format for unformatted text, also used by AppleWorks on the Apple II computer. Although used in VisiCalc this kind of file can’t convey the formulas used in an original document. It’s suitable for direct transfer as an ASCII file.
Àù PCs use a filename extension of .DIF.
Symbolic Link (TEXT)
SYLK is a useful spreadsheet format that retains number formats, column widths and cell alignments as well as data. Many applications support it, including Resolve, Wingz and Excel. It’s far superior to a text file and can be transferred directly as an ASCII file.
Àù PCs use a filename extension of .SK, .SLK or.SYL.